package org.builder.bean.dyn;

import java.io.Serializable;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.StringUtils;

public abstract class AntXml implements Serializable {

	private Map<String,AntXml> container = new HashMap<String, AntXml>();
	private String antXmlId ;
	
	public AntXml(){
		antXmlId = RandomStringUtils.randomAlphanumeric(40);
		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
		System.out.println("AntXmlID: "+antXmlId);
		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
	}
	
	public void add(AntXml child) {
		container.put(child.toString(), child);
	}
	
	public Collection<AntXml> getChildren(){
		return container.values();
	}
	
	
	public String getAntXmlID(){
		return antXmlId ;
	}
}
